package com.jy.service.impl;

import com.jy.bean.Consignee;
import com.jy.bean.User;
import com.jy.dao.ConsigneeDao;
import com.jy.service.ConsigneeService;

import java.util.List;

public class ConsigneeSericelmpl implements ConsigneeService {
    private ConsigneeDao consigneeDao;

    @Override
    public Integer selectquantity() {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.selectquantity();
    }

    @Override
    public List<Consignee> consigneeList() {
        consigneeDao = new ConsigneeDao();
        return  consigneeDao.consigneeList();
    }

    @Override
    public Integer selectcommodity() {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.selectcommodity();
    }

    @Override
    public List<Consignee> consigneeById(String id) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.consigneeById(id);
    }

    @Override
    public List<Consignee> consigneeBypicture() {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.consigneeBypicture();
    }

    @Override
    public List<Consignee> consigneeByName(String name) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.consigneeByName(name);
    }

    @Override
    public List<Consignee> selectConsigneeById(String id) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.selectConsigneeById(id);
    }

    @Override
    public List<Consignee> selectByParams(Consignee params) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.selectByParams(params);
    }

    @Override
    public List<String> consigneetype() {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.consigneetype();
    }

    @Override
    public Boolean selelctconsigneeByid(String id, String name) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.selelctconsigneeByid(id,name);
    }

    @Override
    public Integer selelctconsigneeBymaxid(String name) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.selelctconsigneeBymaxid(name);
    }

    @Override
    public boolean insertConsignee(Consignee consignee) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.insertConsignee(consignee);
    }

    @Override
    public Boolean updateconsigneeImg(String name, String img) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.updateconsigneeImg(name,img);
    }

    @Override
    public Boolean updateMerchandise(Consignee consignee) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.updateMerchandise(consignee);
    }

    @Override
    public boolean Delete_goods(String name) {
        consigneeDao = new ConsigneeDao();
        return consigneeDao.Delete_goods(name);
    }
}
